<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>系统安装</title>
  <link rel="stylesheet" href="../src/layui/css/layui.css">
  <link rel="stylesheet" href="../src/css/style.css">
</head>
<body>
  <nav>
    <ul class="layui-nav layui-bg-green ">
     <div class="layui-container">  
      <li class="layui-nav-item layui-this"><h1 class="font-h1">系统安装向导</h1></li>
      <li class="layui-nav-item">

      </li>
      <li class="layui-nav-item fr">
      	<a name="grid" href="http://guestbook.eedo.net/guestbook.html" target="_blank">eedo留言管理系统</a>
      </li>
      <span class="layui-nav-bar" style="left: 307.5px; top: 55px; width: 0px; opacity: 0;"></span>
    </div>
  </ul>
</nav>
<div class="layui-container">  

  <div class="layui-row">
  	<div class="layui-row mt2 mb2">
     <span class="layui-breadcrumb" lay-separator=">">
       <a>许可协议</a>
       <a class="font-h1">环境检测</a>
       <a>参数配置</a>
       <a>安装完成</a>
     </span>
   </div>
 </div>

 <div class="layui-form">
  <blockquote class="layui-elem-quote news_search">
  服务器信息
  </blockquote>
  <table class="layui-table">
    <colgroup>
      <col>
      <col>
    </colgroup>
    <thead>
      <tr>  
        <th >参数</th>
        <th>参考值</th>

      </tr> 
    </thead>
    <tbody>
      <tr>
        <td>服务器域名</td>
        <td><?php echo $sp_name; ?></td>
      </tr>
      <tr>
        <td>服务器操作系统</td>
        <td><?php echo $sp_os; ?></td>
      </tr>
      <tr>
        <td>服务器解译引擎</td>
        <td><?php echo $sp_server; ?></td>
      </tr>
      <tr>
        <td>PHP版本</td>
        <td><?php echo $phpv; ?></td>
      </tr>
    </tbody>
  </table>
  <blockquote class="layui-elem-quote news_search">
  系统环境检测
    <div class="layui-inline" id="notice">
      <div class="layui-form-mid layui-word-aux">系统环境要求必须满足下列所有条件，否则系统或系统部份功能将无法使用。</div>
    </div>
  </blockquote>
  <table class="layui-table">
    <colgroup>
      <col>
      <col>
      <col>
    </colgroup>
    <thead>
      <tr>  
        <th >需开启的变量或函数</th>
        <th>要求</th>
        <th>实际状态及建议</th>
      </tr> 
    </thead>
    <tbody>
      <tr>
        <td>allow_url_fopen</td>
        <td align="center">On </td>
        <td><?php echo $sp_allow_url_fopen; ?> <small>(不符合要求将导致远程资料本地化等功能无法应用)</small></td>
      </tr>
      <tr>
        <td>safe_mode</td>
        <td align="center">Off</td>
        <td><?php echo $sp_safe_mode; ?> <small>(本系统不支持在<span class="STYLE2">非win主机的安全模式</span>下运行)</small></td>
      </tr>
      <tr>
        <td>GD 支持 </td>
        <td align="center">On</td>
        <td><?php echo $sp_gd; ?> <small>(不支持将导致与图片相关的大多数功能无法使用或引发警告)</small></td>
      </tr>
      <tr>
        <td>MySQL 支持</td>
        <td align="center">On</td>
        <td><?php echo $sp_mysql; ?> <small>(不支持无法使用本系统)</small></td>
      </tr>
      <tr>
        <td>CURL 支持</td>
        <td align="center">On</td>
        <td><?php echo $sp_curl; ?> <small>(不支持无法获取最新版本信息)</small></td>
      </tr>
    </tbody>
  </table>
    <blockquote class="layui-elem-quote news_search">
    目录权限检测
    <div class="layui-inline" id="notice">
      <div class="layui-form-mid layui-word-aux">系统要求必须满足下列所有的目录权限全部可读写的需求才能使用，其它应用目录可安装后在管理后台检测。
      </div>
    </div>
  </blockquote>
  <table class="layui-table">
    <colgroup>
      <col>
      <col>
      <col>
    </colgroup>
    <thead>
      <tr>  
        <th >需开启的变量或函数</th>
        <th>要求</th>
        <th>实际状态及建议</th>
      </tr> 
    </thead>
    <tbody>
      <?php
      foreach($sp_testdirs as $d){
      ?>
      <tr>
        <td><?php echo $d;?></td>
        <?php
        $fulld = str_replace('/*','',$d);
        $rsta = (is_readable('..'.$fulld) ? '<font color=green>[√]读</font>' : '<font color=red>[×]读</font>');
        $wsta = (TestWrite($fulld) ? '<font color=green>[√]写</font>' : '<font color=red>[×]写</font>');
        echo "<td>$rsta</td><td>$wsta</td>\r\n";
        ?>
      </tr>
      <?php
    }
    ?>
  </tbody>
</table>
</div>
<div class="layui-form-item tc">

  <a class="layui-btn layui-btn-primary" lay-submit="" onclick="window.location.href='index.php';">后退</a>
  <button type="reset" class="layui-btn " onclick="window.location.href='index.php?step=3'">下一步</button>

</div>
</div>
<script src="../src/layui/layui.js"></script>
<script>
//一般直接写在一个js文件中
layui.use(['layer', 'form','element'], function(){
  var layer = layui.layer,
  form = layui.form,
  element = layui.element,
  $ = layui.jquery;
});
</script> 
</body>
</html>